package com.itfreer.data.db.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.itfreer.data.db.dao.DataDao;
import com.itfreer.data.db.service.DataService;

@Component("dataService")
public class DataServiceImp implements DataService {
	
	@Autowired
	protected DataDao dataDao;

	@Override
	public List<Map<String, Object>> getRows(String id, String queryFields, String queryWhere, String order,
			Integer pageSize, Integer pageIndex) {
		List<Map<String, Object>> list= dataDao.getRows(id, queryFields, queryWhere, order, pageSize, pageIndex);
		return list;
	}

	@Override
	public Long getRowCounts(String id, String queryWhere) {
		Long count = dataDao.getRowCounts(id, queryWhere);
		return count;
	}

}
